<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The ZMQSocket class</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="zmqcontext.setopt.html">ZMQContext::setOpt</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="zmqsocket.bind.html">ZMQSocket::bind</a></div>
 <div class="up"><a href="book.zmq.html">0MQ messaging</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="class.zmqsocket" class="reference">

 <h1 class="title">The ZMQSocket class</h1>
 

 <div class="partintro"><p class="verinfo">(No version information available, might only be in Git)</p>


  <div class="section" id="zmqsocket.intro">
   <h2 class="title">简介</h2>
   <p class="para">

   </p>
  </div>


  <div class="section" id="zmqsocket.synopsis">
   <h2 class="title">类摘要</h2>


   <div class="classsynopsis">
    <div class="ooclass"></div>


    <div class="classsynopsisinfo">
     <span class="ooclass">
      <strong class="classname">ZMQSocket</strong>
     </span>
     {</div>

    
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Methods */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">ZMQSocket</span><span class="methodname"><a href="zmqsocket.bind.html" class="methodname">bind</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$dsn</code></span>
   [, <span class="methodparam"><span class="type">boolean</span> <code class="parameter">$force</code><span class="initializer"> = false</span></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">ZMQSocket</span><span class="methodname"><a href="zmqsocket.connect.html" class="methodname">connect</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$dsn</code></span>
   [, <span class="methodparam"><span class="type">boolean</span> <code class="parameter">$force</code><span class="initializer"> = false</span></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="methodname"><a href="zmqsocket.construct.html" class="methodname">__construct</a></span>
    ( <span class="methodparam"><span class="type"><a href="class.zmqcontext.html" class="type ZMQContext">ZMQContext</a></span> <code class="parameter">$context</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$type</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$persistent_id</code><span class="initializer"> = null</span></span>
   [, <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.callback" class="type callback">callback</a></span> <code class="parameter">$on_new_socket</code><span class="initializer"> = null</span></span>
  ]] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">ZMQSocket</span><span class="methodname"><a href="zmqsocket.connect.html" class="methodname">connect</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$dsn</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">array</span><span class="methodname"><a href="zmqsocket.getendpoints.html" class="methodname">getEndpoints</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="zmqsocket.getpersistentid.html" class="methodname">getPersistentId</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">integer</span><span class="methodname"><a href="zmqsocket.getsockettype.html" class="methodname">getSocketType</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">mixed</span><span class="methodname"><a href="zmqsocket.getsockopt.html" class="methodname">getSockOpt</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">boolean</span><span class="methodname"><a href="zmqsocket.ispersistent.html" class="methodname">isPersistent</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="zmqsocket.recv.html" class="methodname">recv</a></span>
    ([ <span class="methodparam"><span class="type">integer</span> <code class="parameter">$mode</code><span class="initializer"> = 0</span></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="zmqsocket.recvmulti.html" class="methodname">recvMulti</a></span>
    ([ <span class="methodparam"><span class="type">integer</span> <code class="parameter">$mode</code><span class="initializer"> = 0</span></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">ZMQSocket</span><span class="methodname"><a href="zmqsocket.send.html" class="methodname">send</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$message</code></span>
   [, <span class="methodparam"><span class="type">integer</span> <code class="parameter">$mode</code><span class="initializer"> = 0</span></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">ZMQSocket</span><span class="methodname"><a href="zmqsocket.send.html" class="methodname">send</a></span>
    ( <span class="methodparam"><span class="type">array</span> <code class="parameter">$message</code></span>
   [, <span class="methodparam"><span class="type">integer</span> <code class="parameter">$mode</code><span class="initializer"> = 0</span></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">ZMQSocket</span><span class="methodname"><a href="zmqsocket.setsockopt.html" class="methodname">setSockOpt</a></span>
    ( <span class="methodparam"><span class="type">integer</span> <code class="parameter">$key</code></span>
   , <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">ZMQSocket</span><span class="methodname"><a href="zmqsocket.unbind.html" class="methodname">unbind</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$dsn</code></span>
   )</div>

   }</div>


  </div>

 </div>

 










































































































<h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li><a href="zmqsocket.bind.html">ZMQSocket::bind</a> — Bind the socket</li><li><a href="zmqsocket.connect.html">ZMQSocket::connect</a> — Connect the socket</li><li><a href="zmqsocket.construct.html">ZMQSocket::__construct</a> — Construct a new ZMQSocket</li><li><a href="zmqsocket.disconnect.html">ZMQSocket::disconnect</a> — Disconnect a socket</li><li><a href="zmqsocket.getendpoints.html">ZMQSocket::getEndpoints</a> — Get list of endpoints</li><li><a href="zmqsocket.getpersistentid.html">ZMQSocket::getPersistentId</a> — Get the persistent id</li><li><a href="zmqsocket.getsockettype.html">ZMQSocket::getSocketType</a> — Get the socket type</li><li><a href="zmqsocket.getsockopt.html">ZMQSocket::getSockOpt</a> — Get socket option</li><li><a href="zmqsocket.ispersistent.html">ZMQSocket::isPersistent</a> — Whether the socket is persistent</li><li><a href="zmqsocket.recv.html">ZMQSocket::recv</a> — Receives a message</li><li><a href="zmqsocket.recvmulti.html">ZMQSocket::recvMulti</a> — Receives a multipart message</li><li><a href="zmqsocket.send.html">ZMQSocket::send</a> — Sends a message</li><li><a href="zmqsocket.sendmulti.html">ZMQSocket::sendmulti</a> — Sends a multipart message</li><li><a href="zmqsocket.setsockopt.html">ZMQSocket::setSockOpt</a> — Set a socket option</li><li><a href="zmqsocket.unbind.html">ZMQSocket::unbind</a> — Unbind the socket</li></ul>
</div>
<hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="zmqcontext.setopt.html">ZMQContext::setOpt</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="zmqsocket.bind.html">ZMQSocket::bind</a></div>
 <div class="up"><a href="book.zmq.html">0MQ messaging</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
